package com.smartalarmclock.Model.Exceptions;

@SuppressWarnings("serial")
public final class DataEntityDoesNotExistException extends DataEntityQueryException {
	
	/**
	 * Constructor
	 * @param dataType the type of the DataEntity
	 */
	public DataEntityDoesNotExistException(Class<?> dataType) {
		super(String.format(
			"Could not find data entity of type %s in the database.",
			String.valueOf(dataType)));
	}
	
	/**
	 * Constructor
	 * @param dataType the type of the DataEntity
	 * @param condition the condition for the query of the instance.
	 */
	public DataEntityDoesNotExistException(Class<?> dataType, String condition) {
		super(String.format(
			"Could not find data entity of type %s in the database using the condition: %s",
			new Object[] { dataType.getSimpleName(), condition }));
	}
}
